package pc.sort;

import java.util.Arrays;

import pc.util.Task;

public abstract class AbstractSort extends Task<int[]> {
	
	public static final int SIZE = 20000;
	
	@Override
	public int[] pre() {
		int[] ret = new int[SIZE];
		for ( int i = 0; i < ret.length; ++i ) {
			ret[i] = (int) (Math.random()*10000);
		}
		return ret;
	}

	@Override
	public void post(int[] in) {
		System.out.println( Arrays.toString(in) );
	}
	
	@Override
	public boolean validate(int[] in) {
		for ( int i = 1; i < in.length; ++i ) {
			if ( in[i] < in[i-1] )
				return false;
		}
		return true;
	}

}
